import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import { IsOptional } from "class-validator";
import { QueryDto } from "/@/common/dto/query.dto";

export class GetSwiperDto {}

export class GetCollectDto extends QueryDto {}
export class CollectDto {
  @ApiProperty({ description: "商品id" })
  readonly goods_id: string;
}

export class DelCollectDto {
  @ApiProperty({ description: "收藏id" })
  readonly id: number;
}

export class GetCartDto extends QueryDto {}
export class CartDto {
  @IsOptional()
  @ApiPropertyOptional({ description: "单个购物车id" })
  readonly id: number;

  @IsOptional()
  @ApiPropertyOptional({ description: "增/减" })
  readonly mode: string;

  @ApiProperty({ description: "商品id" })
  readonly goods_id: string;
}
